package tests

import (
	"testing"
	"time"

	jaeger "github.com/uber/jaeger-client-go"
)

func TestJaeger(t *testing.T) {
	trans, err := jaeger.NewUDPTransport("127.0.0.1:6831", 65535)
	if err != nil {
		t.Error(err)
		return
	}

	tracer, closer := jaeger.NewTracer("xxxxService", jaeger.NewConstSampler(true), jaeger.NewRemoteReporter(trans))
	defer closer.Close()

	span := tracer.StartSpan("aaaa")
	time.Sleep(100 * time.Millisecond)
	span.Finish()
	time.Sleep(1 * time.Second)
}
